<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>登录</title>
    <script src="https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/jquery/3.5.1/jquery.min.js"></script>
    <script>

        function log(userId){
            $.ajax({
                type: "POST",
                url: "http://www.log.com/log",
                dataType: "text",
                contentType: 'text/plain',  //application/json;charset=utf-8
                data:JSON.stringify({ user_id:userId, act_time:  new Date().getTime(), action:"login", job_code:null }),
                success: function(data){
                },
                error:function(data){
                }
            });
        }

        $(document).ready(function(){

            $("#login").click(function(){
                var userId = $("#userId").val();
                if(!userId){
                    return;
                }
                log(userId);
                $.ajax({
                    type: "POST",
                    url: "http://www.biz.com/lagou/login",
                    dataType: "text",
                    contentType: 'application/json;charset=utf-8',
                    success: function(data){
                        window.location.href="http://www.biz.com/static/job.html?userId="+userId;
                    },
                    error:function(data){
                        alert("error");
                    }
                });
            })
        })
    </script>
</head>
<body>
    用户<input type="text" id="userId"/>
    <button id="login">登录</button>
</body>
</html>